package private

import "github.com/gin-gonic/gin"

type RouterSql struct{}

func (r *RouterSql) InitRouterRouterSql(privateGroup *gin.RouterGroup) (R gin.IRoutes) {
	privateGroup = privateGroup.Group("sql")
	{
		privateGroup.POST("get-sql-list", apiPrivate.ApiSql.GetSqlList)
		privateGroup.POST("add-sql", apiPrivate.ApiSql.AddSql)
		privateGroup.POST("validate-sql", apiPrivate.ApiSql.ValidateSql)
		privateGroup.POST("validate-pre-defined-table", apiPrivate.ApiSql.ValidatePreDefinedTable)
		privateGroup.POST("edit-sql", apiPrivate.ApiSql.EditSql)
		privateGroup.POST("delete-sql-by-id", apiPrivate.ApiSql.DeleteSqlById)
		privateGroup.POST("query-sql-by-id", apiPrivate.ApiSql.QuerySqlById)

		privateGroup.POST("query-sql-by-sql-code", apiPrivate.ApiSql.QuerySqlBySqlCode)
		privateGroup.POST("query-sql-result-by-sql-code", apiPrivate.ApiSql.QuerySqlResultBySqlCode)
		privateGroup.POST("query-sql-columns-by-sql-code", apiPrivate.ApiSql.QuerySqlColumnsBySqlCode)
		privateGroup.POST("query-direct-sql", apiPrivate.ApiSql.QueryDirectSql)
		privateGroup.POST("save-direct-sql-result-to-excel", apiPrivate.ApiSql.SaveDirectSqlResultToExcel)
		// privateGroup.POST("query-user-by-role", apiPrivate.ApiRole.QueryUserByRole)
		// privateGroup.POST("remove-role-user", apiPrivate.ApiRole.RemoveRoleUser)
		// privateGroup.POST("add-role-user", apiPrivate.ApiRole.AddRoleUser)

		// privateGroup.POST("get-role-menu-list", apiPrivate.ApiRole.GetRoleMenuList)
		// privateGroup.POST("edit-role-menu", apiPrivate.ApiRole.EditRoleMenu)

		// privateGroup.POST("get-role-api-list", apiPrivate.ApiRole.GetRoleApiList)
		// privateGroup.POST("edit-role-api", apiPrivate.ApiRole.EditRoleApi)

		// privateGroup.POST("edit-role-dept-data-permission", apiPrivate.ApiRole.EditRoleDeptDataPermission)
	}
	return privateGroup
}
